package com.daka.vo.response;

import com.daka.entity.User;
import lombok.Data;
import lombok.ToString;

import java.math.BigDecimal;

/**
 * Created by yangx
 * CreateTime: 2016/12/14 15:29
 */

@Data
@ToString
public class UserDetailVo extends User {

    private String teamName;
    private String teamPic;
    private Integer Number;


    public static UserDetailVo build(User user) {
        UserDetailVo userDetailVo = new UserDetailVo();
        userDetailVo.setId(user.getId());
        userDetailVo.setName(user.getName());
        userDetailVo.setTeam(user.getTeam());
        userDetailVo.setHeadUrl(user.getHeadUrl());
        userDetailVo.setMobile(user.getMobile());
        userDetailVo.setDeclaration(user.getDeclaration());
        userDetailVo.setMoney(user.getMoney().divide(BigDecimal.valueOf(100)));
        return userDetailVo;
    }
}
















